import request from '@/utils/request'
// 获取房间列表
export function getRoomList(data){
  return new request({
    url:`/rooms/`,
    method:'get',
    params:data,
  })
}

// 删除房间
export function daleteRoom(id){
  return new request({
    url:`/rooms/${id}`,
    method:'DELETE'
  })
}

// 增加房间
export function addRoom(data){
  return new request({
    url:'/rooms',
    method:'POST',
    data,
  })
}

// 维修房间,更新房间
export function repairRoom(data){
return  new request({
  url:`/rooms/${data.id}`,
  method:"PUT",
  data,
})
}

// 获取房间信息
export function getroom(id){
  return new request({
    url:`/rooms/${id}`,
    method:"get",
  })
}